/*
 * action 类型
 */


export const SEARCH_USER = 'SEARCH_USER';
export const REQUEST_USERS = 'REQUEST_USERS';
export const RECEIVE_USERS = 'RECEIVE_USERS';

export const CREATE_USER = 'CREATE_USER';
export const CREATE_REQUEST_USER = 'CREATE_REQUEST_USER';
export const CREATE_RECEIVE_USER = 'CREATE_RECEIVE_USER';

/*
 * action 创建函数
 */
function action(type, payload = {}) {
    return {type, ...payload}
}


export const searchUserList = data => action(SEARCH_USER, data);

export const createUser = data => action(CREATE_USER, data);

